package com.sinodata.bsm.common.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * EventCorrelationLink entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "EVENT_CORRELATION_LINK")
public class EventCorrelationLink implements java.io.Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = -4143250076325164218L;

    // Fields 
    private Long id;
    private Long eventCorrelationPolicyId;
    private Long resId;
    private Long eventTypeLinkId;
    private Long resRelation;
    private String serialNumber;

    // Constructors

    /** default constructor */
    public EventCorrelationLink() {
    }

    /** minimal constructor */
    public EventCorrelationLink(Long id) {
        this.id = id;
    }

    /** full constructor */
    public EventCorrelationLink(Long id, Long eventCorrelationPolicyId, Long resId, Long eventTypeLinkId, Long resRelation, String serialNumber) {
        this.id = id;
        this.eventCorrelationPolicyId = eventCorrelationPolicyId;
        this.resId = resId;
        this.eventTypeLinkId = eventTypeLinkId;
        this.resRelation = resRelation;
        this.serialNumber = serialNumber;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "EVENT_CORRELATION_LINK_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 22, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "EVENT_CORRELATION_POLICY_ID", precision = 22, scale = 0)
    public Long getEventCorrelationPolicyId() {
        return this.eventCorrelationPolicyId;
    }

    public void setEventCorrelationPolicyId(Long eventCorrelationPolicyId) {
        this.eventCorrelationPolicyId = eventCorrelationPolicyId;
    }

    @Column(name = "RES_ID", precision = 22, scale = 0)
    public Long getResId() {
        return this.resId;
    }

    public void setResId(Long resId) {
        this.resId = resId;
    }

    @Column(name = "EVENT_TYPE_LINK_ID", precision = 22, scale = 0)
    public Long getEventTypeLinkId() {
        return this.eventTypeLinkId;
    }

    public void setEventTypeLinkId(Long eventTypeLinkId) {
        this.eventTypeLinkId = eventTypeLinkId;
    }

    @Column(name = "RES_RELATION", precision = 22, scale = 0)
    public Long getResRelation() {
        return resRelation;
    }

    public void setResRelation(Long resRelation) {
        this.resRelation = resRelation;
    }

    @Column(name = "SERIAL_NUMBER", length = 10)
    public String getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
    }

    @Override
    public String toString() {
        return "EventCorrelationLink [id=" + id + ", eventCorrelationPolicyId=" + eventCorrelationPolicyId + ", resId=" + resId + ", eventTypeLinkId=" + eventTypeLinkId + ", resRelation=" + resRelation + "]";
    }
}